Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(forms): normalize written value in NumberValueAccessor #10379

Closed
wants to merge 1 commit into from

Conversation

marclaval
Copy link
Contributor

2 unit tests were failing in IE9:

E 9.0.0 (Windows 7 0.0.0) integration tests different control types should support <type=number> when value is cleared programmatically FAILED
    Expected 'null' to equal ''.

IE 9.0.0 (Windows 7 0.0.0) reactive forms integration tests different control types should support <type=number> when value is cleared programmatically FAILED
    Expected 'null' to equal ''.

@@ -44,7 +44,8 @@ export class NumberValueAccessor implements ControlValueAccessor {
constructor(private _renderer: Renderer, private _elementRef: ElementRef) {}

writeValue(value: number): void {
this._renderer.setElementProperty(this._elementRef.nativeElement, 'value', value);
var normalizedValue = isBlank(value) ? '' : value;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use const, add comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@vicb vicb added pr_state: LGTM action: merge The PR is ready for merge by the caretaker labels Jul 29, 2016
@vicb
Copy link
Contributor

vicb commented Jul 29, 2016

Thanks

@marclaval marclaval closed this in b48f7bc Jul 29, 2016
@marclaval marclaval deleted the fixFormsIE9 branch December 11, 2017 09:59
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants